package com.greenleaf.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单表
 * */
@Component
public class Order {
private Integer orderId;//编号
private String orderNumber;//订单号
private Integer vId;//所属会员
private Vip vip;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ",timezone="GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//存日期时使用
private Date orderTime;//下单时间
private double total;//总金额
private String orderText;//订单备注
private String paymentState;//支付状态（未支付已支付）
private String masterState;//主状态（待发货、待收货、待评价、已评价）
private String branchState;//辅状态（为取消、已取消）
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ",timezone="GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//存日期时使用
private Date paymentTime;//支付时间
private String paymentMode;//支付方式
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ",timezone="GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//存日期时使用
private Date eTime;//过期时间

public Vip getVip() {
	return vip;
}
public void setVip(Vip vip) {
	this.vip = vip;
}

public Order(Integer orderId, String orderNumber, Integer vId, Vip vip, Date orderTime, double total, String orderText,
		String paymentState, String masterState, String branchState, Date paymentTime, String paymentMode, Date eTime) {
	super();
	this.orderId = orderId;
	this.orderNumber = orderNumber;
	this.vId = vId;
	this.vip = vip;
	this.orderTime = orderTime;
	this.total = total;
	this.orderText = orderText;
	this.paymentState = paymentState;
	this.masterState = masterState;
	this.branchState = branchState;
	this.paymentTime = paymentTime;
	this.paymentMode = paymentMode;
	this.eTime = eTime;
}
public Order(Integer orderId, String orderNumber, Integer vId, Date orderTime, double total, String orderText, String paymentState,
		String masterState, String branchState, Date paymentTime, String paymentMode, Date eTime) {
	super();
	this.orderId = orderId;
	this.orderNumber = orderNumber;
	this.vId = vId;
	this.orderTime = orderTime;
	this.total = total;
	this.orderText = orderText;
	this.paymentState = paymentState;
	this.masterState = masterState;
	this.branchState = branchState;
	this.paymentTime = paymentTime;
	this.paymentMode = paymentMode;
	this.eTime = eTime;
}
public Order() {
	super();
}

@Override
public String toString() {
	return "Order [orderId=" + orderId + ", orderNumber=" + orderNumber + ", vId=" + vId + ", vip=" + vip
			+ ", orderTime=" + orderTime + ", total=" + total + ", orderText=" + orderText + ", paymentState="
			+ paymentState + ", masterState=" + masterState + ", branchState=" + branchState + ", paymentTime="
			+ paymentTime + ", paymentMode=" + paymentMode + ", eTime=" + eTime + "]";
}
public Integer getOrderId() {
	return orderId;
}
public void setOrderId(Integer orderId) {
	this.orderId = orderId;
}
public String getOrderNumber() {
	return orderNumber;
}
public void setOrderNumber(String orderNumber) {
	this.orderNumber = orderNumber;
}
public Integer getvId() {
	return vId;
}
public void setvId(Integer vId) {
	this.vId = vId;
}
public Date getOrderTime() {
	return orderTime;
}
public void setOrderTime(Date orderTime) {
	this.orderTime = orderTime;
}
public double getTotal() {
	return total;
}
public void setTotal(double total) {
	this.total = total;
}
public String getOrderText() {
	return orderText;
}
public void setOrderText(String orderText) {
	this.orderText = orderText;
}
public String getPaymentState() {
	return paymentState;
}
public void setPaymentState(String paymentState) {
	this.paymentState = paymentState;
}
public String getMasterState() {
	return masterState;
}
public void setMasterState(String masterState) {
	this.masterState = masterState;
}
public String getBranchState() {
	return branchState;
}
public void setBranchState(String branchState) {
	this.branchState = branchState;
}
public Date getPaymentTime() {
	return paymentTime;
}
public void setPaymentTime(Date paymentTime) {
	this.paymentTime = paymentTime;
}
public String getPaymentMode() {
	return paymentMode;
}
public void setPaymentMode(String paymentMode) {
	this.paymentMode = paymentMode;
}
public Date geteTime() {
	return eTime;
}
public void seteTime(Date eTime) {
	this.eTime = eTime;
}




}